1. Field of the Invention
The present invention relates to a loop connection detecting method and device, and in particular to a loop connection detecting method and device which detect a loop on a network to halt a packet transfer.
2. Description of the Related Art
FIG. 6 shows an arrangement of a generally-known LAN (Local Area Network), which is composed of a core portion 10 and access portions ACC1-ACC4. It is to be noted that the access portions ACC1-ACC4 are respectively composed of hub switches 20 (collectively represented), which are connected to terminals (not shown). As means for improving availability of this LAN, LAN switches 10_1-10_4 provided in the core portion 10 are connected e.g. as shown in FIG. 6; the switches 10_1 and 10_2, the switches 10_2 and 10_4, the switches 10_4 and 10_3, and the switches 10_3 and 10_1 are respectively interconnected. This connection makes paths between the LAN switches redundant. In this case, a spanning tree protocol (STP) in conformity with IEEE802.1d is applied to the core portion 10.
Namely, when a loop connection state is detected in the output port of the LAN switch 10_4 in the example of FIG. 6, the spanning tree protocol performs a packet discard and a packet transfer halt by a block operation BLK1 to the output port.
If such a spanning tree protocol is applied not only to the core portion 10 of the LAN but also to both of the access portions ACC3 and ACC 4 (access portions ACC1 and ACC2 are omitted for simplifying the figure) as shown in FIG. 7, block operations BLK2 and BLK3 are respectively performed based on the spanning tree protocol when an improper (error) connection CCT1 is made between two switches 20 in e.g. the access portion ACC3 to cause a loop state, or when a loop state occurs as a result of an improper connection CCT2 being made in a single hub switch 20 of the access portion ACC4. Thus, a loop in an adequate port can be automatically excluded.
However, in the above-mentioned access portions in the LAN,    (1) Since communications are disabled for fifty seconds from a link-up (operation after power-on) due to a characteristic of the spanning tree protocol, a DHCP function of a terminal is blocked and an IP address can not be acquired:    (2) On the grounds that the spanning tree protocol function is not originally required since no redundant arrangement is adopted, services in which the access portions are not included in the core portion 10 so that the spanning tree protocol function is not applied thereto, as shown in FIG. 6, are performed in many cases.
Thus, in case the spanning tree protocol is not applied to the access portions, when the improper connection CCT1 occurs between two hub switches 20 in the access portion ACC3 or the improper connection CCT2 occurs in a single hub switch 20 in the access portion ACC4 in the same way as the example of FIG. 7, loops are formed in the access portions ACC3 and ACC4 as shown in FIG. 8. Therefore, when a broadcast BRC of a packet is performed from a terminal 30 connected to the hub switch 20, the packet is endlessly copied by the broadcast BRC as shown in FIG. 9 (at step S70), and the traffic is flowed in up to the limit (at steps S71 and S72) by the copying, which makes the traffic of the entire core portion 10 of the LAN rapidly increase and causes a LAN to be meltdown (at steps S73).
On the other hand, as a method for detecting a loop connection, there is a method of detecting and releasing a loop occurrence in a LAN using a spanning tree protocol which includes a step of transmitting a loop detecting test frame within the LAN from a single relay device in the LAN using the spanning tree protocol, a step of detecting whether or not the loop detecting test frame is returned to the relay device which has transmitted the loop detecting test frame after circulating a loop transmission line to be received, and a step of determining an occurrence of a loop transmission path when the loop detecting test frame is returned to the relay device to be received, and disconnecting a connection port which has received the loop detecting frame (see e.g. patent document 1).
Furthermore, there is a serial bus processing method by which a loop connection composed within a serial bus is detected, a random time is set according to the number of ports which can not be recognized upon detection of the loop connection, and a port is invalidated when the random time elapses (see e.g. patent document 2).
Moreover, there is a serial bus network device comprising a 1394 input/output port connecting to a 1394 cable, a physical layer processing an electric signal transmitted to the 1394 input/output port, a port switch connected to the 1394 input/output port and opening/closing the input/output port, and a controller controlling opening/closing of the port switch (see e.g. patent document 3).    [Patent Document 1]    Japanese Patent Application Laid-open No. 2003-9118    [Patent Document 2]    Japanese Patent Application Laid-open No. 2002-261785    [Patent Document 3]    Japanese Patent Application Laid-open No. 2001-77839
As mentioned above, the spanning tree protocol function is not applied to the hub switches or the like composing the access portion in the LAN in many cases. If the hub switch 20 makes the improper connection CCT (at step S1), as shown in FIG. 10A, in a state in which the spanning tree protocol function is not applied, and if packets are flowed into the hub switch 20 from the terminal 30 by the broadcast BRC, a large amount of traffic occurs and occupies the band.
As a normal operation, every time the hub switch 20 receives a broadcast packet, the hub switch 20 copies the packet to be transmitted to all of the ports. Therefore, if the looped LAN connection CCT is made as shown in FIG. 10A, a large amount of broadcast packets are endlessly copied within the loop connection CCT, which leads to an occurrence of a limited traffic (at step S2).
In this state, the network is filled with the endlessly copied packets and normal communications are disabled, which causes a meltdown of the network (at step S3).
Also, once such a meltdown occurs, since it is difficult to find the place of the loop connection or the like, there is a problem that tracking down takes time. Therefore, it is required to prevent the meltdown.